package com.xyz.caofancpu.service.impl;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xyz.caofancpu.mapper.SysDictMapper;
import com.xyz.caofancpu.model.SysConfigDictMo;
import com.xyz.caofancpu.service.SysDictService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * ServiceImpl CommonOperate
 * This code is generated by the Hen, strongly recommended not to modify directly.
 */
@Service("sysDictService")
@DependsOn("initContextPropertyInitializer")
@Slf4j
public class SysDictServiceImpl implements SysDictService {

    @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
    @Autowired
    private transient SysDictMapper sysDictMapper;

    @Override
    public List<SysConfigDictMo> getInitSysDictList() {
        return sysDictMapper.getInitSysDictList();
    }

    @Override
    @SuppressWarnings("unchecked")
    public PageInfo<List<SysConfigDictMo>> getSysDictList() {
        PageHelper.startPage(1, 10);
        List<SysConfigDictMo> resultList = sysDictMapper.getSysDictList();
        return new PageInfo(resultList);
    }

    @Override
    public void batchAddConfig(List<SysConfigDictMo> sysConfigDictMoList) {
        sysDictMapper.batchAddConfig(sysConfigDictMoList);
    }
}

